/********************************************************************
	created:	2010/09/02
	created:	2:9:2010   16:06
	filename: 	c:\Develoment\OpenSource\Network\TwitterAPI\LibTwitter\twitter.h
	file path:	c:\Develoment\OpenSource\Network\TwitterAPI\LibTwitter
	file base:	twitter
	file ext:	h
	author:		Kim, Jong-Kook (d0nzs00n@naver.com, twiiter.com/smok95 )
	
	purpose:	
	History:
		0.4.2 101104 Array Template bug fix 
		0.4.3 101201 http 503 response parsing error fix
		0.5.0 101206 added Streaming API - UserStreams
		0.5.1 110307 status update bug fix (case-sensitive status)
		0.5.2 110405 support friendship resources
		0.6.0 110412 refactoring
*********************************************************************/
#ifndef _TWITTER_H_
#define _TWITTER_H_
#include <string>
#include <stdexcept>
#include "CommonMacros.h"
//#include "resource/twit4c/JKOauth.h"
#include "resources.h"
//#include "Value.h"

#define TWIT4CPP_VERSION "0.6.0"

NS_BEGIN(Twit)

class  Twitter
{
	CJKOauth o;
public:
	Twitter(std::string& customerKey, std::string& customerSecret):o(customerKey,customerSecret),
	  OAuth(o),XAuth(OAuth), Timeline(o), DirectMessages(o), Friendships(o), Tweets(o),
	  UserStream(o), User(o)
	{
	}
	~Twitter(void){}
   inline void setCustomer(std::string& key, std::string& secret){ o.setCustomer(key,secret); }
   void setAccessToken(std::string& token, std::string& tokenSecret){ o.setAccessToken(token,tokenSecret); }
   response request(std::string reqUri, RequestMethod method=RequestMethodGet){
	   return o.request(reqUri.c_str(), method);
   }

   Resource::COAuth           OAuth;
   Resource::XAuth&           XAuth;
   Resource::CTimeline			Timeline;
   Resource::CDirectMessages	DirectMessages;
   Resource::CFriendships		Friendships;
   Resource::CTweets			Tweets;
   CUserStream					UserStream;
   Resource::CUser				User;
/*
   
   
   Resource::CList            List;
   Resource::CTrends     trends;
   */
};



NS_END;


#endif /* _TWITTER_H_ */
